// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class DG1 : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Set ID - Diagnosis",1)]
  	    [HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"SI")]
	    public SI SetIDDiagnosis {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Diagnosis Coding Method",2)]
  	    [HL7Field(HL7Version.v23, 2, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 2, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"ID")]
		[DiagnosisCodingMethod]
	    public ID DiagnosisCodingMethod {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Diagnosis Code",3)]
  	    [HL7Field(HL7Version.v23, 3, HL7Repeat.False, HL7Required.True,"CE_0051")]
  	    [HL7Field(HL7Version.v231, 3, HL7Repeat.False, HL7Required.True,"CE_0051")]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.False, HL7Required.True,"CE_0051")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.False, HL7Required.True,"CWE")]
		[DiagnosisCode]
	    public CWE DiagnosisCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Diagnosis Description",4)]
  	    [HL7Field(HL7Version.v23, 4, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 4, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST DiagnosisDescription {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Diagnosis Date/Time",5)]
  	    [HL7Field(HL7Version.v23, 5, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 5, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM DiagnosisDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Diagnosis Type",6)]
  	    [HL7Field(HL7Version.v23, 6, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 6, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.False, HL7Required.True,"CWE")]
		[DiagnosisType]
	    public CWE DiagnosisType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Major Diagnostic Category",7)]
  	    [HL7Field(HL7Version.v23, 7, HL7Repeat.False, HL7Required.True,"CE_0118")]
  	    [HL7Field(HL7Version.v231, 7, HL7Repeat.False, HL7Required.True,"CE_0118")]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.False, HL7Required.True,"CE_0118")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.False, HL7Required.True,"CNE")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.False, HL7Required.True,"CNE")]
		[MajorDiagnosticCategory]
	    public CNE MajorDiagnosticCategory {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Diagnostic Related Group",8)]
  	    [HL7Field(HL7Version.v23, 8, HL7Repeat.False, HL7Required.True,"CE_0055")]
  	    [HL7Field(HL7Version.v231, 8, HL7Repeat.False, HL7Required.True,"CE_0055")]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.False, HL7Required.True,"CE_0055")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.False, HL7Required.True,"CNE")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.False, HL7Required.True,"CNE")]
		[DiagnosisRelatedGroup]
	    public CNE DiagnosticRelatedGroup {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 DRG Approval Indicator",9)]
  	    [HL7Field(HL7Version.v23, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 9, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID DRGApprovalIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 DRG Grouper Review Code",10)]
  	    [HL7Field(HL7Version.v23, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGGrouperReviewCode]
	    public CWE DRGGrouperReviewCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Outlier Type",11)]
  	    [HL7Field(HL7Version.v23, 11, HL7Repeat.False, HL7Required.True,"CE_0083")]
  	    [HL7Field(HL7Version.v231, 11, HL7Repeat.False, HL7Required.True,"CE_0083")]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.False, HL7Required.True,"CE_0083")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.False, HL7Required.True,"CWE")]
		[OutlierType]
	    public CWE OutlierType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Outlier Days",12)]
  	    [HL7Field(HL7Version.v23, 12, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 12, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 12, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 12, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM OutlierDays {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Outlier Cost",13)]
  	    [HL7Field(HL7Version.v23, 13, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v231, 13, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v24, 13, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.False, HL7Required.True,"CP")]
	    public CP OutlierCost {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 Grouper Version And Type",14)]
  	    [HL7Field(HL7Version.v23, 14, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 14, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 14, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST GrouperVersionAndType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Diagnosis Priority",15)]
  	    [HL7Field(HL7Version.v23, 15, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 15, HL7Repeat.False, HL7Required.True,"NM")]
		[DiagnosisPriority]
	    public NM DiagnosisPriority {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Diagnosing Clinician",16)]
  	    [HL7Field(HL7Version.v23, 16, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v231, 16, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v24, 16, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.True, HL7Required.True,"XCN")]
	    public XCN[] DiagnosingClinician {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Diagnosis Classification",17)]
  	    [HL7Field(HL7Version.v23, 17, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 17, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 17, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 17, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 17, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 17, HL7Repeat.False, HL7Required.True,"CWE")]
		[DiagnosisClassification]
	    public CWE DiagnosisClassification {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Confidential Indicator",18)]
  	    [HL7Field(HL7Version.v23, 18, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 18, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 18, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 18, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 18, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 18, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID ConfidentialIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 Attestation Date/Time",19)]
  	    [HL7Field(HL7Version.v23, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 19, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM AttestationDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 Diagnosis Identifier",20)]
  	    [HL7Field(HL7Version.v25, 20, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v251, 20, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v27, 20, HL7Repeat.False, HL7Required.True,"EI")]
	    public EI DiagnosisIdentifier {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 Diagnosis Action Code",21)]
  	    [HL7Field(HL7Version.v25, 21, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 21, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 21, HL7Repeat.False, HL7Required.True,"ID")]
		[Segmentactioncode]
	    public ID DiagnosisActionCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 Parent Diagnosis",22)]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v27, 22, HL7Repeat.False, HL7Required.True,"EI")]
	    public EI ParentDiagnosis {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("23 DRG CCL Value Code",23)]
  	    [HL7Field(HL7Version.v26, 23, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 23, HL7Repeat.False, HL7Required.True,"CWE")]
		[CCLValue]
	    public CWE DRGCCLValueCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("24 DRG Grouping Usage",24)]
  	    [HL7Field(HL7Version.v26, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 24, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID DRGGroupingUsage {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("25 DRG Diagnosis Determination Status",25)]
  	    [HL7Field(HL7Version.v26, 25, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 25, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGDiagnosisDeterminationStatus]
	    public CWE DRGDiagnosisDeterminationStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("26 Present On Admission (POA) Indicator",26)]
  	    [HL7Field(HL7Version.v26, 26, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 26, HL7Repeat.False, HL7Required.True,"CWE")]
		[PresentOnAdmissionPOAIndicator]
	    public CWE PresentOnAdmissionPOAIndicator {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 27)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 28)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 29)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 30)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 31)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 32)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 33)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 34)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 35)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 36)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 37)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 38)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 39)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 40)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 41)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 42)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 43)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 44)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 45)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 46)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			SetIDDiagnosis = (SI)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(SI), "DG1.1");
			DiagnosisCodingMethod = (ID)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(ID), "DG1.2");
			DiagnosisCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 3, options, typeof(CWE), "DG1.3");
			DiagnosisDescription = (ST)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(ST), "DG1.4");
			DiagnosisDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 5, options, typeof(DTM), "DG1.5");
			DiagnosisType = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 6, options, typeof(CWE), "DG1.6");
			MajorDiagnosticCategory = (CNE)ParseTextAtPositionIntoData(segmentTextParts, 7, options, typeof(CNE), "DG1.7");
			DiagnosticRelatedGroup = (CNE)ParseTextAtPositionIntoData(segmentTextParts, 8, options, typeof(CNE), "DG1.8");
			DRGApprovalIndicator = (ID)ParseTextAtPositionIntoData(segmentTextParts, 9, options, typeof(ID), "DG1.9");
			DRGGrouperReviewCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 10, options, typeof(CWE), "DG1.10");
			OutlierType = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 11, options, typeof(CWE), "DG1.11");
			OutlierDays = (NM)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(NM), "DG1.12");
			OutlierCost = (CP)ParseTextAtPositionIntoData(segmentTextParts, 13, options, typeof(CP), "DG1.13");
			GrouperVersionAndType = (ST)ParseTextAtPositionIntoData(segmentTextParts, 14, options, typeof(ST), "DG1.14");
			DiagnosisPriority = (NM)ParseTextAtPositionIntoData(segmentTextParts, 15, options, typeof(NM), "DG1.15");
	    	DiagnosingClinician = (XCN[])ParseTextAtPositionIntoDataArray<XCN>(segmentTextParts, 16, options, "DG1.16");
			DiagnosisClassification = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 17, options, typeof(CWE), "DG1.17");
			ConfidentialIndicator = (ID)ParseTextAtPositionIntoData(segmentTextParts, 18, options, typeof(ID), "DG1.18");
			AttestationDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 19, options, typeof(DTM), "DG1.19");
			DiagnosisIdentifier = (EI)ParseTextAtPositionIntoData(segmentTextParts, 20, options, typeof(EI), "DG1.20");
			DiagnosisActionCode = (ID)ParseTextAtPositionIntoData(segmentTextParts, 21, options, typeof(ID), "DG1.21");
			ParentDiagnosis = (EI)ParseTextAtPositionIntoData(segmentTextParts, 22, options, typeof(EI), "DG1.22");
			DRGCCLValueCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 23, options, typeof(CWE), "DG1.23");
			DRGGroupingUsage = (ID)ParseTextAtPositionIntoData(segmentTextParts, 24, options, typeof(ID), "DG1.24");
			DRGDiagnosisDeterminationStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 25, options, typeof(CWE), "DG1.25");
			PresentOnAdmissionPOAIndicator = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 26, options, typeof(CWE), "DG1.26");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("DG1");
		    segmentParts.Add(SetIDDiagnosis);
		    segmentParts.Add(DiagnosisCodingMethod);
			segmentParts.Add(GetER7TextForSegmentPart(DiagnosisCode, options));
		    segmentParts.Add(DiagnosisDescription);
			segmentParts.Add(GetER7TextForSegmentPart(DiagnosisDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(DiagnosisType, options));
			segmentParts.Add(GetER7TextForSegmentPart(MajorDiagnosticCategory, options));
			segmentParts.Add(GetER7TextForSegmentPart(DiagnosticRelatedGroup, options));
		    segmentParts.Add(DRGApprovalIndicator);
			segmentParts.Add(GetER7TextForSegmentPart(DRGGrouperReviewCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(OutlierType, options));
			segmentParts.Add(GetER7TextForSegmentPart(OutlierDays, options));
			segmentParts.Add(GetER7TextForSegmentPart(OutlierCost, options));
		    segmentParts.Add(GrouperVersionAndType);
			segmentParts.Add(GetER7TextForSegmentPart(DiagnosisPriority, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(DiagnosingClinician, options));
			segmentParts.Add(GetER7TextForSegmentPart(DiagnosisClassification, options));
		    segmentParts.Add(ConfidentialIndicator);
			segmentParts.Add(GetER7TextForSegmentPart(AttestationDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(DiagnosisIdentifier, options));
		    segmentParts.Add(DiagnosisActionCode);
			segmentParts.Add(GetER7TextForSegmentPart(ParentDiagnosis, options));
			segmentParts.Add(GetER7TextForSegmentPart(DRGCCLValueCode, options));
		    segmentParts.Add(DRGGroupingUsage);
			segmentParts.Add(GetER7TextForSegmentPart(DRGDiagnosisDeterminationStatus, options));
			segmentParts.Add(GetER7TextForSegmentPart(PresentOnAdmissionPOAIndicator, options));
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

